package com.xh.petdogexpert.expert.service.imp;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xh.petdogexpert.expert.dto.Dog;
import com.xh.petdogexpert.expert.mapper.DogMapper;
import com.xh.petdogexpert.expert.service.IDogService;

@Service
public class DogServiceImp implements IDogService {

	@Autowired
	DogMapper dogMapper;

	@Autowired
	HttpSession session;

	public List<Dog> queryDogs(Dog dog) {
		return dogMapper.queryDogs(dog);
	}

//	/**
//	 * 根据狗的id获取狗的详细信息，和用户相关
//	 * @author linxixin
//	 * @throws BaseException 
//	 * @date 2016年3月23日
//	 * @see com.xh.petdogexpert.expert.service.IDogService#getUserDogDetail(java.lang.Integer,java.lang.Integer)
//	 */
//	@Override
//	public Dog getUserDogDetail(Integer dogId, Integer userId) throws BaseException {
//		Dog condition = new Dog();
//		condition.setId(dogId);
//		condition.setUserId(userId);
//		Dog dog = null;
//		try {
//			dog = dogMapper.getUserDogDetail(condition);
//		} catch (Exception e) {
//			e.printStackTrace();
//			throw new BaseException("获取狗狗信息失败");
//		}
//		if (dog == null)
//			throw new BaseException("获取狗狗信息失败");
//		
//		
//		return dog;
//	}
}
